<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ include file="/WEB-INF/adminui/include/css.jsp" %>
<title>生产主体统计表</title>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
	<div class="row">
		<div class="col-sm-2">
			<div class="ibox ibox-body">
				<div class="ibox-title">
					<h5>选择分组</h5>
				</div>
				<div class="ibox-content">
					<div id="jstree"></div>
				</div>
			</div>
		</div>
		<div class="col-sm-10">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div id="toolbar" class="columns pull-left">
							<button type="button" class="btn btn-primary" onclick="doexport()">
								<i class="fa fa-plus hidden" aria-hidden="true"></i>导出为Excel
							</button>
						</div>
					</div>
					<table id="dataTable" data-mobile-responsive="true">
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<%@ include file="/WEB-INF/adminui/include/script.jsp" %>
<script type="text/javascript">
$(function(){
	UiList.render({
		treeUrl: '${path}/group/groupJstree.json?maxGroupType=2',
		tableConfig:{
			url: "${path}/statistics/sczttj_list.json",
			idfield: 'parkid',
			columns: [
				{field : 'parkNo', title : '园区编号'},
				{field : 'parkName', title : '园区名称'},
				{field : 'contactPerson', title : '联系人'},
				{field : 'mobile', title : '联系电话'},
				{field : 'parkLevel', title : '园区级别'},
				{field : 'teseStatus', title : '是否为特色基地', formatter : function(value, row, index) {
					switch(''+value){
					case '0': return '否';
					case '1': return '是';
					}
					return ''+value;
				}},
				{field : 'parkAddress', title : '地址'}
			]
		}
	});
	
});

function doexport(){
	var node = UiList.getSelectedTreeNode();
	var url = '${path}/statistics/sczttj_export.do?datatype='+node.type+'&leftdata='+node.id;
	window.open(url, '_blank');
}

</script>
</body>
</html>